(()=>{"use strict";var e,t={59665:(e,t,r)=>{var n=y(r(91165)),o=y(r(54437)),a=y(r(85846));r(5211),r(95229);var l=y(r(53009)),i=y(r(90926)),u=r(86106),f=y(r(83486)),c=y(r(18959)),d=y(r(14791)),s=y(r(27792)),p=y(r(94412));function y(e){return e&&e.__esModule?e:{default:e}}a.default.extend(l.default),n.default.init(window.init),window.CTFd=n.default,window.helpers=p.default,window.$=o.default,window.dayjs=a.default,window.nunjucks=i.default,window.Howl=u.Howl,(0,o.default)((function(){(0,d.default)(),(0,s.default)(),(0,f.default)(c.default.urlRoot)}))},28489:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}r(59665);var o=c(r(54437)),a=c(r(91165)),l=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=n(e)&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var i=a?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(o,l,i):o[l]=e[l]}return o.default=e,r&&r.set(e,o),o}(r(62780)),i=c(r(85846));r(5211),r(95229);var u=r(37507);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function(e){return e?r:t})(e)}function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var p=(0,o.default)("#score-graph"),y=(0,o.default)("#scoreboard tbody");function h(e){var t,r,n,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=d(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return l=e.done,e},e:function(e){i=!0,a=e},f:function(){try{l||null==r.return||r.return()}finally{if(i)throw a}}}}(document.cookie.split("; "));try{for(o.s();!(t=o.n()).done;){var a=(r=t.value.split("="),n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,l,i=[],u=!0,f=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);u=!0);}catch(e){f=!0,o=e}finally{try{if(!u&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(f)throw o}}return i}}(r,n)||d(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=a[0],i=a[1];if(l===e)return decodeURIComponent(i)}}catch(e){o.e(e)}finally{o.f()}return"zh"}var v=function(){return a.default.api.get_scoreboard_detail({count:10}).then((function(e){var t=e.data,r=Object.keys(t);if(0===r.length)return!1;for(var n,o={title:{left:"center",text:"en"===h("Scr1wCTFdLanguage")?"Top 10 "+("teams"===a.default.config.userMode?"Teams":"Users"):"前十名"+("teams"===a.default.config.userMode?"队伍":"用户")},tooltip:{trigger:"axis",axisPointer:{type:"cross"}},legend:{type:"scroll",orient:"horizontal",align:"left",bottom:35,data:[]},toolbox:{feature:{dataZoom:{yAxisIndex:"none"},saveAsImage:{}}},grid:{containLabel:!0},xAxis:[{type:"time",boundaryGap:!1,data:[]}],yAxis:[{type:"value"}],dataZoom:[{id:"dataZoomX",type:"slider",xAxisIndex:[0],filterMode:"filter",height:20,top:35,fillerColor:"rgba(233, 236, 241, 0.4)"}],series:[]},l=function(){for(var e=[],a=[],l=0;l<t[r[f]].solves.length;l++){e.push(t[r[f]].solves[l].value);var c=(0,i.default)(t[r[f]].solves[l].date);a.push(c.toDate())}var d=(0,u.cumulativeSum)(e);n=a.map((function(e,t){return[e,d[t]]})),o.legend.data.push(t[r[f]].name);var s={name:t[r[f]].name,type:"line",label:{normal:{position:"top"}},itemStyle:{normal:{color:(0,u.colorHash)(t[r[f]].name+t[r[f]].id)}},data:n};o.series.push(s)},f=0;f<r.length;f++)l();return o}))};function m(){a.default.api.get_scoreboard_list().then((function(e){var t=e.data;y.empty();for(var r=0;r<t.length;r++){var n=["<tr>",'<th scope="row" class="text-center">',r+1,"</th>",'<td><a href="{0}/teams/{1}">'.format(a.default.config.urlRoot,t[r].account_id),(0,u.htmlEntities)(t[r].name),"</a></td>","<td>",t[r].score,"</td>","</tr>"].join("");y.append(n)}})),v().then((function(e){l.init(document.querySelector("#score-graph"),null,{locale:h("Scr1wCTFdLanguage")}).setOption(e)}))}(0,o.default)((function(){setInterval(m,3e5),v().then((function(e){if(!1!==e){p.empty();var t=l.init(document.querySelector("#score-graph"),null,{locale:h("Scr1wCTFdLanguage")});t.setOption(e),(0,o.default)(window).on("resize",(function(){null!=t&&null!=t&&t.resize()}))}else p.html('<h3 class="opacity-50 text-center w-100 justify-content-center align-self-center">'+("en"===h("Scr1wCTFdLanguage")?"No solves yet":"尚未解出题目")+"</h3>")}))})),window.updateScoreboard=m}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var a=r[e]={id:e,loaded:!1,exports:{}};return t[e](a,a.exports,n),a.loaded=!0,a.exports}n.m=t,e=[],n.O=(t,r,o,a)=>{if(!r){var l=1/0;for(c=0;c<e.length;c++){for(var[r,o,a]=e[c],i=!0,u=0;u<r.length;u++)(!1&a||l>=a)&&Object.keys(n.O).every((e=>n.O[e](r[u])))?r.splice(u--,1):(i=!1,a<l&&(l=a));if(i){e.splice(c--,1);var f=o();void 0!==f&&(t=f)}}return t}a=a||0;for(var c=e.length;c>0&&e[c-1][2]>a;c--)e[c]=e[c-1];e[c]=[r,o,a]},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={775:0,671:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var o,a,[l,i,u]=r,f=0;if(l.some((t=>0!==e[t]))){for(o in i)n.o(i,o)&&(n.m[o]=i[o]);if(u)var c=u(n)}for(t&&t(r);f<l.length;f++)a=l[f],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(c)},r=self.webpackChunkctfd=self.webpackChunkctfd||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var o=n.O(void 0,[759,736,353],(()=>n(28489)));o=n.O(o)})();